<script src="${basepath}/plug/laypage/laypage.js"></script>
<br/>
<div class="dt_footer">
<div class="row-fluid">
<div class="span4"><div class="dataTables_info" id="demo-dtable-03_info">当前 <font id="ceurrindex"> ${data.pageNumber!0}</font>  共 ${data.totalPage!0}页 ${data.totalRow!0} 条信息</div></div>
<div class="span8">
<div id="page1" class="dataTables_paginate paging_bootstrap pagination">
</div>
</div>
</div>
</div>
<br/>
<input type="hidden" name="pageNumber" id="pageNumber" page="0" value="${data.pageNumber!0}" />
<script type="text/javascript">
laypage({
    cont: 'page1',
    skin: 'molv',
    skip: true, //是否开启跳页
    curr: 6, //初始化当前页
    pages: ${data.totalPage!0}, //可以叫服务端把总页数放在某一个隐藏域，再获取。假设我们获取到的是18
    curr: function(){ //通过url获取当前页，也可以同上（pages）方式获取
	return ${data.pageNumber!0};
    }(),
    jump: function(e, first){ //触发分页后的回调
    	if(!first){ //一定要加此判断，否则初始时会无限刷新
         $("#pageNumber").val(e.curr);
       	 $("#ceurrindex").text(e.curr)
         ajaxurl(e.curr);
        }
    }
});
function ajaxurl(page){
	var from = $("#pageNumber").closest("form");
	gx.post(from.attr("action"),from.attr("id"),function(d){
		var gettpl = $("#page_tpl").html();
		laytpl(gettpl).render(d, function(html){
			   $("#tbody_body").html(html);
		});
	})
}
$(function(){
	ajaxurl(0);
})
</script>